<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Introduction</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '00703.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00704.html" target="topic">Console System Service Library Help</a> &gt; <a href="00703.html" target="topic">Introduction</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="00704.html" target="topic">Previous</a> | <a href="00704.html" target="topic">Up</a> | <a href="00708.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS CONSOLE Introduction Topic Title: Introduction)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
Introduction</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
The Console System Service consists of a core<span style="color: #FFFFFF">_</span>layer and a console device<span style="color: #FFFFFF">_</span>layer. The core<span style="color: #FFFFFF">_</span>layer handles module initialization and system functions. It provides a common API for use by applications and middleware libraries to send and receive data to and from one or more console devices. The Console System core layer<span style="color: #FFFFFF">_</span>maintains the status and device descriptor information for each console instance that has been initialized.&nbsp;</p>
<p class="Element10">
The console device layer<span style="color: #FFFFFF">_</span>contains the functional implementation of the core layer<span style="color: #FFFFFF">_</span>APIs. Each console device may have a different implementation, but the behavior of the API should be uniform across different devices. The console device layer<span style="color: #FFFFFF">_</span>interacts with the peripheral libraries or drivers or middle-wares to send and receive data to and from the hardware peripheral. The details of the data transaction are abstracted by the console device layer.&nbsp;</p>
<p class="Element10">
The console implementation is non-blocking in nature. For console write requests, the application data is copied into the ring buffer maintained by the console device layer and the call returns immediately. The return value of the API indicates the number of bytes actually copied. If the return value is less than the requested bytes, the application must retry after some time. The data transfer is controlled by a state machine implemented in the console device<span style="color: #FFFFFF">_</span>layer.&nbsp;</p>
<p class="Element10">
Similarly, for console read requests, the received data is copied to the application buffer from the internal receive ring buffer maintained by the console device layer. The return value indicates the number of bytes actually copied to the application buffer. Application must try reading again after some time, if the number of read bytes copied (indicated by the return value) is less than the bytes requested.&nbsp;</p>
<p class="Element10">
The size of the transmit and receive ring buffers is configurable in MHC.</p></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00704.html" target="topic">Console System Service Library Help</a> &gt; <a href="00703.html" target="topic">Introduction</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="00704.html" target="topic">Previous</a> | <a href="00704.html" target="topic">Up</a> | <a href="00708.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS CONSOLE Introduction Topic Title: Introduction)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>